<template>
	<div class="modify-dialog">
		<slot> </slot>
		<el-dialog v-bind="dialogOpts" :visible.sync="dialogVisible">
			<div class="page-wrap" style="height: 65vh">
				<Table v-bind="tableOpts" defaultExpandAll v-on="tableEvent"> </Table>
			</div>
		</el-dialog>
	</div>
</template>

<script>
import modifyMixins from "@/mixins/modifyMixins.vue";
import tableMixins from "@/mixins/tableMixins.vue";

export default {
	name: "PaymentList",
	mixins: [tableMixins, modifyMixins],
	data() {
		return {
			// apiName: "newPaymentList",
			apiName:"orderPaymentDetials",
			dialogWidth: "80vw",
			form: {
				id: {
					tag: "el-input",
					label: "订单编号",
					value: "",
					props: {
						clearable: true,
						placeholder: "请输入订单编号",
					},
				},
			},
		};
	},
	computed: {
		title() {
			return "回款详情";
		},
	},
	mounted() {},
	methods: {
		showDialog(modify = "add", row = {}) {
			this.dialogVisible = true;
			this.row = row;
			this.fetchCurrentTable();
		},
		formatQuery(opts) {
			const { date = [], ...params } = opts;
			if (date && date[0] && date[1]) {
				params.startTime = dayjs(date[0]).format("YYYY-MM-DD HH:mm:ss");
				params.endTime = dayjs(date[1]).format("YYYY-MM-DD HH:mm:ss");
			}
			params.orderId = this.row.id;
			return params;
		},
	},
};
</script>

<style lang="less" scoped>
:deep(.el-table__expanded-cell) {
	padding: 0;
}
</style>

